-- GENERATED SPELL FOR [Weegli Blastfuse] --


function spell0_7607(pUnit, Event) --@Bomb,n/a--
pUnit:FullCastSpellOnTarget(8858,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7607', 2000, 1)
end

function spell1_7607(pUnit, Event) --@Goblin Land Mine,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(21688,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_7607', 1, 1)
end

function spell2_7607(pUnit, Event) --@Plant explosives,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(10772,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_7607', 1, 1)
end

function spell3_7607(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7607', 570, 1)
end

function Sorts_7607(pUnit, Event)
local choix_sorts_7607 = math.random(0, 3)
if choix_sorts_7607 == 0 then
pUnit:RegisterEvent('spell0_7607', 1, 1)
end
if choix_sorts_7607 == 1 then
pUnit:RegisterEvent('spell1_7607', 1, 1)
end
if choix_sorts_7607 == 2 then
pUnit:RegisterEvent('spell2_7607', 1, 1)
end
if choix_sorts_7607 == 3 then
pUnit:RegisterEvent('spell3_7607', 1, 1)
end
end

function mob7607_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7607', math.random(1500, 3000), 1)
end

function mob7607_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7607_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7607_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7607, 1, 'mob7607_Action')
RegisterUnitEvent(7607, 2, 'mob7607_Leave')
RegisterUnitEvent(7607, 3, 'mob7607_Kill')
RegisterUnitEvent(7607, 4, 'mob7607_Die')
